home *** CD-ROM | disk | FTP | other *** search
-
- {
- if(true)
- {
- CShot = §§newclass(CShot,CThingSprite);
- }
- }
-
- package Local.Game.Thing
- {
- import Local.*;
- import Local.Game.World.*;
- import Local.Game.World.Map.*;
- import Local.Game.World.Map.Cell.*;
- import Local.Math.*;
- import flash.display.*;
- import flash.events.*;
- import flash.geom.*;
-
- public class CShot extends CThingSprite
- {
-
- public static var colors:Array = [16777215,16777215,16777215];
-
- public static var alphas:Array = null;
-
- public static var spreads:Array = [0,180,255];
-
- {
- §§push(§§findproperty(alphas));
- §§push(1 * 0.5);
- §§push(0.5);
- §§push(0.5);
- if(true)
- {
- §§push(§§pop() * §§pop());
- §§push(0 * 0.5);
- }
- }
-
- public var gradientBoxMatrix:Matrix;
-
- internal var mTarget:*;
-
- internal var mTrailReferences:Array;
-
- internal var mTrailPoints:Array;
-
- public function CShot(param1:CPosition)
- {
- if(true)
- {
- super();
- if(true)
- {
- mBaseType = "shot";
- if(true)
- {
- mPosition = param1;
- if(true)
- {
- mTrailPoints = [param1.Clone()];
- if(true)
- {
- mTrailReferences = new Array();
- }
- mTargetAirbourne = false;
- }
- mDisposable = true;
- }
- MapAdd();
- }
- zDepth = 500;
- }
- }
-
- override public function Dispose() : void
- {
- var _loc1_:CCell = null;
- if(true)
- {
- if(mDisposed)
- {
- if(true)
- {
- return;
- }
- }
- else
- {
- super.Dispose();
- }
- if(mTrailReferences)
- {
- addr30:
- for each(_loc1_ in mTrailReferences)
- {
- if(true)
- {
- _loc1_.RemoveRefThing(this);
- }
- }
- }
- return;
- }
- §§goto(addr30);
- }
-
- public function MapMoveTrail() : Boolean
- {
- mTrailPoints.unshift(mPosition.Clone());
- if(mCellCurrent.InCell(mPosition.x))
- {
- §§push(false);
- if(true)
- {
- return §§pop();
- }
- }
- else
- {
- mTrailReferences.push(mCellCurrent);
- mCellCurrent.AddRefThing(this);
- mCellCurrent.RemoveThing(this);
- mCellCurrent = mMap.AddThing(this);
- §§push(true);
- }
- return §§pop();
- }
-
- public function DrawTrail(param1:Number, param2:Number = 180) : *
- {
- var _loc3_:Graphics = null;
- var _loc4_:* = NaN;
- var _loc5_:Number = NaN;
- var _loc6_:Function = null;
- var _loc7_:CPosition = null;
- if(mTrailPoints.length < 2 || mInvisible || CGlobal.mFastRender)
- {
- return;
- }
- _loc3_ = mcDrawScratch.graphics;
- if(true)
- {
- _loc3_.clear();
- if(true)
- {
- §§push(mPosition.x - mLandscape.mDrawPosition.x);
- if(true)
- {
- §§push(§§pop());
- if(true)
- {
- _loc4_ = §§pop();
- if(true)
- {
- addr70:
- _loc5_ = mPosition.y - mLandscape.mDrawPosition.y;
- addr69:
- if(true)
- {
- if(!gradientBoxMatrix)
- {
- if(true)
- {
- gradientBoxMatrix = new Matrix();
- }
- gradientBoxMatrix.createGradientBox(param2 * 2 * (mTrailPoints[1].x < mPosition.x ? -1 : 1),1000,0,0,0);
- }
- }
- gradientBoxMatrix.tx = mTrailPoints[1].x < mPosition.x ? _loc4_ - param2 : _loc4_ + param2;
- }
- _loc3_.lineStyle(param1);
- §§goto(addr131);
- }
- §§goto(addr69);
- }
- §§goto(addr70);
- }
- addr131:
- _loc3_.lineGradientStyle(GradientType.LINEAR,colors,alphas,spreads,gradientBoxMatrix,SpreadMethod.PAD);
- §§goto(addr141);
- }
- addr141:
- _loc6_ = _loc3_.moveTo;
- for each(_loc7_ in mTrailPoints)
- {
- §§push(_loc7_.x - mLandscape.mDrawPosition.x);
- if(true)
- {
- §§push(§§pop());
- if(true)
- {
- _loc4_ = §§pop();
- if(true)
- {
- addr178:
- _loc5_ = _loc7_.y - mLandscape.mDrawPosition.y;
- _loc6_(_loc4_,_loc5_);
- addr177:
- }
- _loc6_ = _loc3_.lineTo;
- if(true)
- {
- if(Math.abs(_loc7_.x - mPosition.x) <= param2 * 2)
- {
- continue;
- }
- }
- break;
- }
- §§goto(addr177);
- }
- §§goto(addr178);
- }
- bPlane.draw(mcDrawScratch);
- }
- }
- }
-